From 02c9ebc59575abeca70c9f143e11d10505e52ea6 Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 25 Sep 2006 01:08:25 +0000 Subject: [PATCH] =?utf8?q?Add=20configure=20option=20to=20set=20docdir=20a?= =?utf8?q?nd=20enable=20efence=20builds.=20From=20Fenoy=20G=C3=A9rald.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Makefile.in | 17 +++++++++++----- configure | 42 ++++++++++++++++++++++++++++++++++++--- configure.in | 21 ++++++++++++++++++-- tools/mkcapabilities.in | 2 +- xmldoc/chapters/build.xml | 6 ++++++ xmldoc/makedoc.in | 1 + 6 files changed, 78 insertions(+), 11 deletions(-) diff --git a/Makefile.in b/Makefile.in index f4dafadc8..2c674fb18 100644 --- a/Makefile.in +++ b/Makefile.in @@ -36,7 +36,7 @@ OUTPUT_SWITCH=-o # GBCFLAGS=$(EXTRA_CFLAGS) $(DEBUGGING) -I. -I@srcdir@/coldsync \ $(OPTIMIZATION) @CFLAGS@ LDFLAGS=$(EXTRA_LDFLAGS) @LDFLAGS@ -INSTALL_TARGETDIR=/usr/local/ +DESTDIR=/usr/local/ # OTHER_ROOT=/opt/local # For DarwinPorts on OSX # OTHER_ROOT=/sw # Uncomment For Fink on OS X. @@ -93,14 +93,17 @@ OBJS = main.o globals.o $(LIBOBJS) @FILEINFO@ # Directory of local web doc. Traditionally a sibling to the GPSBabel tree. -WEB=../babelweb/ +WEB=@DOCDIR@ all: gpsbabel$(EXEEXT) -gpsbabel$(EXEEXT): $(OBJS) +gpsbabel$(EXEEXT): $(OBJS) @GPSBABEL_DEBUG@ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) @LIBS@ @EXPAT_LIB@ @USB_LIBS@ $(OUTPUT_SWITCH)$@ +gpsbabel-debug: $(OBJS) + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) @LIBS@ @EFENCE_LIB@ @EXPAT_LIB@ @USB_LIBS@ $(OUTPUT_SWITCH)$@ + Makefile: Makefile.in config.status CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -132,8 +135,11 @@ torture: # # This will only work on UNIX-like substances. # -install: - install gpsbabel $(INSTALL_TARGETDIR)/bin +install: @INSTALL_DEBUG@ + install gpsbabel $(DESTDIR)/bin + +install-debug: + install gpsbabel-debug $(DESTDIR)/bin # Nerdy release stuff that needs to work only on Linux. @@ -157,6 +163,7 @@ $(WEB)/htmldoc-$(DOCVERSION)/readme.html: FORCE --stringparam root.filename "readme" \ xmldoc/babelmain.xsl \ xmldoc/readme.xml + chmod 755 tools/mkcapabilities tools/mkcapabilities gpsbabel.html: FORCE diff --git a/configure b/configure index 5b2798e1e..be7c1e896 100755 --- a/configure +++ b/configure @@ -273,7 +273,7 @@ PACKAGE_VERSION='1.3.1' PACKAGE_STRING='GPSBabel 1.3.1' PACKAGE_BUGREPORT='BUG-REPORT-ADDRESS' -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PACKAGE_RELEASE GBMAJOR GBMINOR GBMICRO build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE FILEINFO RC LIBUSBCONFIG USB_LIBS USB_CFLAGS OSJEEPS GBSER ZLIB EXPAT_LIB LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PACKAGE_RELEASE GBMAJOR GBMINOR GBMICRO build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE FILEINFO RC LIBUSBCONFIG USB_LIBS USB_CFLAGS OSJEEPS GBSER ZLIB EXPAT_LIB EFENCE_LIB GPSBABEL_DEBUG INSTALL_DEBUG DOCDIR LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -811,6 +811,7 @@ Optional Features: --enable-pdb=(yes)|no --enable-csv=(yes)|no --enable-filters=(yes)|no + --enable-efence=yes|(no) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -819,6 +820,7 @@ Optional Packages: --with-zlib=(included)|system|no --with-expathdr=DIR Use this to specify the location of expat.h --with-libexpat=DIR Use this to specify expat library . + --with-doc=DIR Path where the documentation will be stored. Some influential environment variables: CC C compiler command @@ -3285,11 +3287,39 @@ cat >>confdefs.h <<\_ACEOF _ACEOF -# [EXPAT_LIB="$LDFLAGS -lexpat"] fi +echo "$as_me:$LINENO: checking for efence" >&5 +echo $ECHO_N "checking for efence... $ECHO_C" >&6 +# Check whether --enable-efence or --disable-efence was given. +if test "${enable_efence+set}" = set; then + enableval="$enable_efence" + if test "$enable_efence" != "no" ; then + EFENCE_LIB=-lefence + GPSBABEL_DEBUG=gpsbabel-debug + INSTALL_DEBUG=install-debug + fi +fi; + + + +echo "$as_me:$LINENO: result: $EFENCE_LIB" >&5 +echo "${ECHO_T}$EFENCE_LIB" >&6 + +echo "$as_me:$LINENO: checking for docdir" >&5 +echo $ECHO_N "checking for docdir... $ECHO_C" >&6 + +# Check whether --with-doc or --without-doc was given. +if test "${with_doc+set}" = set; then + withval="$with_doc" + DOCDIR="$withval" +else + DOCDIR="../babelweb/" +fi; + + # Checks for header files. # AC_HEADER_STDC @@ -3418,7 +3448,7 @@ fi done - ac_config_files="$ac_config_files Makefile win32/gpsbabel.rc coldsync/Makefile jeeps/Makefile shapelib/Makefile zlib/empty" + ac_config_files="$ac_config_files Makefile xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc coldsync/Makefile jeeps/Makefile shapelib/Makefile zlib/empty" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -3946,6 +3976,8 @@ do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "xmldoc/makedoc" ) CONFIG_FILES="$CONFIG_FILES xmldoc/makedoc" ;; + "tools/mkcapabilities" ) CONFIG_FILES="$CONFIG_FILES tools/mkcapabilities" ;; "win32/gpsbabel.rc" ) CONFIG_FILES="$CONFIG_FILES win32/gpsbabel.rc" ;; "coldsync/Makefile" ) CONFIG_FILES="$CONFIG_FILES coldsync/Makefile" ;; "jeeps/Makefile" ) CONFIG_FILES="$CONFIG_FILES jeeps/Makefile" ;; @@ -4072,6 +4104,10 @@ s,@OSJEEPS@,$OSJEEPS,;t t s,@GBSER@,$GBSER,;t t s,@ZLIB@,$ZLIB,;t t s,@EXPAT_LIB@,$EXPAT_LIB,;t t +s,@EFENCE_LIB@,$EFENCE_LIB,;t t +s,@GPSBABEL_DEBUG@,$GPSBABEL_DEBUG,;t t +s,@INSTALL_DEBUG@,$INSTALL_DEBUG,;t t +s,@DOCDIR@,$DOCDIR,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF diff --git a/configure.in b/configure.in index 3e58529c5..30125b2a8 100644 --- a/configure.in +++ b/configure.in @@ -228,9 +228,26 @@ AC_MSG_RESULT($EXPAT_LIB) AC_CHECK_LIB([expat], [XML_ParserCreate], AC_DEFINE(HAVE_LIBEXPAT, 1, [Defined if you have libexpat]) AC_SUBST(EXPAT_LIB) -# [EXPAT_LIB="$LDFLAGS -lexpat"] ) +AC_MSG_CHECKING(for efence) +AC_ARG_ENABLE(efence, + [ --enable-efence=[yes|(no)]], + [ if test "$enable_efence" != "no" ; then + EFENCE_LIB=-lefence + GPSBABEL_DEBUG=gpsbabel-debug + INSTALL_DEBUG=install-debug + fi]) +AC_SUBST(EFENCE_LIB) +AC_SUBST(GPSBABEL_DEBUG) +AC_SUBST(INSTALL_DEBUG) +AC_MSG_RESULT($EFENCE_LIB) + +AC_MSG_CHECKING(for docdir) +AC_ARG_WITH(doc,[ --with-doc=DIR Path where the documentation will be stored.], + DOCDIR="$withval", DOCDIR="../babelweb/") +AC_SUBST(DOCDIR) + # Checks for header files. # AC_HEADER_STDC @@ -257,5 +274,5 @@ AC_CHECK_LIB([expat], [XML_ParserCreate], # AC_CHECK_FUNCS([atexit floor localtime_r memmove memset pow select sqrt strchr strcspn strdup strerror strncasecmp strrchr strspn strstr strtol strtoul]) AC_CHECK_FUNCS([nanosleep sleep]) -AC_CONFIG_FILES([Makefile win32/gpsbabel.rc coldsync/Makefile jeeps/Makefile shapelib/Makefile zlib/empty]) +AC_CONFIG_FILES([Makefile xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc coldsync/Makefile jeeps/Makefile shapelib/Makefile zlib/empty]) AC_OUTPUT diff --git a/tools/mkcapabilities.in b/tools/mkcapabilities.in index 225326165..172b12adf 100755 --- a/tools/mkcapabilities.in +++ b/tools/mkcapabilities.in @@ -28,4 +28,4 @@ function getcap(type, cap, sname, lname) { } getcap($1, $2, $3, $5) -' > ../babelweb/capabilities.inc > ../babelweb/capabilities.inc +' > @DOCDIR@capabilities.inc > @DOCDIR@capabilities.inc diff --git a/xmldoc/chapters/build.xml b/xmldoc/chapters/build.xml index 1bfe7dc28..c0aee2931 100644 --- a/xmldoc/chapters/build.xml +++ b/xmldoc/chapters/build.xml @@ -43,6 +43,12 @@ is recommended for OS/X and Linux if you want to use a USB Garmin. Excludes all filter support. + + Activate debugging mode for gpsbabel-debug. + + + Specify that the doc should be created and installed in . + Disables use of libusb, even it's it's available. diff --git a/xmldoc/makedoc.in b/xmldoc/makedoc.in index bf6d1728f..7653f5342 100755 --- a/xmldoc/makedoc.in +++ b/xmldoc/makedoc.in @@ -64,6 +64,7 @@ sub includef { +@dir=`mkdir -p @DOCDIR@`; $dir = $0; $dir =~ s:/.*$::; -- 2.30.2